<?php
/**
 * Created by PhpStorm.
 * User: apple
 * Date: 2018/7/22
 * Time: 下午4:11
 */
namespace PddWechat\Models\Pos\Data;

use PddWechat\Models\Pos\Dao\PostInvateDao;
use PddWechat\Models\Pos\DataObject\PostInvateDo;
use PddWechat\Models\Pos\Response\IsApplyResponse;

class PostInviteData
{

    /**
     * PostInvateData constructor.
     */
    public function __construct()
    {
        $this->postInvateDao = new PostInvateDao();
    }

    public function insert(PostInvateDo $postInvateDo)
    {
        return $this->postInvateDao->insert($postInvateDo);
    }

    public function getApplyInfoByPhone(string $phone)
    {
        $postInvateInfo = $this->postInvateDao->getApplyInfoByPhone($phone);
        return $postInvateInfo;
    }

    public function getApplyInfoByOpenId(string $openid)
    {
        $postInvateInfo = $this->postInvateDao->getApplyInfoByOpenId($openid);
        return $postInvateInfo;
    }

    public function getApplyListByOpenId(string $openid)
    {
        $postListInfo = $this->postInvateDao->getApplyListByOpenId($openid);
        return $postListInfo;
    }

    public function getApplyInfoByOrderNum(string $orderNum) {
        return $this->postInvateDao->getApplyInfoByOrderNum($orderNum);
    }
}